package exercise;

import java.util.Scanner;

public class EX03_Q31 {
// 임의의 숫자 6자리를 입력하면 신용카드의 종류와 은행정보를 출력한다
	public static void main(String[] args) {
		/*Scanner sc = new Scanner(System.in);
		System.out.println("숫자 6자리를 입력해 주세요");
		int mynum = sc.nextInt();
		
		switch(mynum/100000){
		case 3 :
			if(mynum/10000 == 35){
			if(mynum == 356317)System.out.println("JCB카드-NH 농협카드");
			else if(mynum==356901)System.out.println("JCB카드-신한카드");
			else if(mynum==356912)System.out.println("JCB카드-KB국민카드");
			else System.out.println("없는 카드입니다");}
			break;
		case 4 :
			if(mynum == 404825)System.out.println("비자카드-NH 농협카드");
			else if(mynum==438676)System.out.println("비자카드-신한카드");
			else if(mynum==457973)System.out.println("비자카드-KB국민카드");
			else System.out.println("없는 카드입니다");
			break;
		case 5 : 
		    if(mynum == 404825)System.out.println("마스타카드-NH 농협카드");
			else if(mynum==438676)System.out.println("마스타카드-신한카드");
			else if(mynum==457973)System.out.println("마스타카드-KB국민카드");
			else System.out.println("없는 카드입니다");
		    break;
		default :System.out.println("잘 못 입력 하셨어요"); 
		}
		*/
		
		Scanner sc = new Scanner(System.in);
		System.out.println("숫자 6자리를 입력해 주세요");
		int mynum = sc.nextInt();
		CardVO c = new CardVO(mynum);
		System.out.println(CardService.cardWhat(c.getMynum()));
	}
	
}
class CardVO{
	private int mynum;
	public CardVO() {
	} 
	public CardVO(int mynum) {
		this.mynum = mynum;
	}
	public void setMynum(int mynum){
		this.mynum = mynum;
	}
	public int getMynum(){
		return mynum;
	}
	
}
class CardService{
	public static String cardWhat(int mynumno){
		String mynum = " ";
		switch(mynumno/100000){
		case 3 :
			if(mynumno/10000 == 35){
			if(mynumno == 356317) mynum="JCB카드-NH 농협카드";
			else if(mynumno==356901)mynum=("JCB카드-신한카드");
			else if(mynumno==356912)mynum=("JCB카드-KB국민카드");
			else mynum=("없는 카드입니다");}
			break;
		case 4 :
			if(mynumno == 404825)mynum=("비자카드-NH 농협카드");
			else if(mynumno==438676)mynum=("비자카드-신한카드");
			else if(mynumno==457973)mynum=("비자카드-KB국민카드");
			else mynum=("없는 카드입니다");
			break;
		case 5 : 
		    if(mynumno == 404825)mynum=("마스타카드-NH 농협카드");
			else if(mynumno==438676)mynum=("마스타카드-신한카드");
			else if(mynumno==457973)mynum=("마스타카드-KB국민카드");
			else mynum=("없는 카드입니다");
		    break;
		default :mynum=("잘 못 입력 하셨어요"); 
		}
		return mynum;
	}
	
}